﻿<%@ Page Language="C#"  MasterPageFile="~/Manage/MainPage.master"  AutoEventWireup="true" CodeFile="EmployeesManage.aspx.cs" Inherits="Manage_EmployeesManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<%@ Import Namespace="Shopping.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">

<script type="text/javascript" src="/Manage/Js/EmployeesManage.js"></script>
<script type="text/javascript">
    ModelOfEmployee = <%=new Employees().ToJsonString() %>;
    CheckOptionOfRoles = '<%=PurviewResourceManage.GetRolesToCheckObject("chkRoleID", "", 4)%>';
</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr >
    <td colspan="10" align="left" class="HeadTitle">&gt;&gt;员工管理</td>
    </tr>
  <tr class="TableHeadRow">
    <td width="50" align="center">编号</td>
    <td align="center">登录名</td>
    <td align="center">真实姓名</td>
    <td width="60" align="center">性别</td>
    <td width="80" align="center">登录次数</td>
    <td width="120" align="center">上次登录日期</td>
    <td width="100" align="center">上次登录IP</td>
    <td width="80" align="center">状态</td>
    <td width="120" align="center">创建日期</td>
    <td width="150" align="center">管理 [<a href="javascript:Add();" class="red">添加用户</a>] </td>
  </tr>
  
  <%
      if (listOfEmployees != null)
      {
          for (int i = 0; i < listOfEmployees.Count; ++i)
          {
              Employees e = listOfEmployees[i];
    %>
  <tr  onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';">
    <td align="center"><%=(pageInfo.CurPage-1)*pageInfo.PageSize +i+1 %>.</td>
    <td align="center" ><a href="javascript:Edit(<%=e.EmployeeID %>);" ><%=e.EmployeeName %>(ID=<%=e.EmployeeID %>)</a></td>
    <td align="center"><%=e.TrueName %></td>
    <td align="center" ><%=e.Sex %></td>
    <td align="center"><%=e.Logins %></td>
    <td align="center">
    <%
        if (e.Logins > 0)
            Response.Write(e.LastLoginDate.ToString("yyyy-MM-dd HH:mm:ss"));
        else
            Response.Write("--");
     %>    </td>
    <td align="center"><%=e.LastLoginIP %></td>
    <td align="center"><%=e.Status %></td>
    <td align="center"><%=e.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center">
     [ <a href="javascript:Edit(<%=e.EmployeeID %>);">编辑</a> ] 
    
     [ <a href="javascript:Delete(<%=e.EmployeeID %>);" class="red">删除</a> ] </td>
  </tr>
    <%} %>
 <tr>
    <td colspan="10" align="center" >
      <span class="page" >
         <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), pageInfo.CurPage, pageInfo.PageSize,10, pageInfo.TotalCount)%>        </span>      </td>
    </tr>
    <%}
      else
      { %>
  <tr>
    <td colspan="10" align="center" class="red">[ 未找到任何信息！]</td>
    </tr>
    <%} %>
</table>

</asp:Content>
